/**
 * Created by ZHOUSH on 1/15/2016.
 */
var java = require('java');
java.classpath.push(__dirname + '/javatools-nodeps.jar');

var parseSql = function (sql) {
    var charArray = java.newArray("char", sql.split(''));
    var cartb = java.newInstanceSync('oracle.javatools.buffer.CharArrayReadTextBuffer', charArray);
    return java.callStaticMethodSync('oracle.javatools.parser.plsql.PlsqlParser','parseSql',cartb);
};
exports.parseSql = parseSql;